/**********************************************************************/
/*                                                                    */
/* File name: PP18.h                                                  */
/*                                                                    */
/* Since:     2002/12/01                                              */
/*                                                                    */
/* Version:   2.02                                                    */
/*                                                                    */
/* Author:    MONTAGNE Xavier [XM] {link xavier.montagne@wanadoo.fr}  */
/*                                                                    */
/* Purpose: Constructor of the main application.                      */
/*                                                                    */
/* Distribution: This file is part of PP18.                           */
/*               PP18 is free software; you can redistribute it       */
/*               and/or modify it under the terms of the GNU General  */
/*               Public License as published by the Free Software     */
/*               Foundation; either version 2, or (at your option)    */
/*               any later version.                                   */
/*                                                                    */
/*               PP18 is distributed in the hope that it will be      */
/*               useful, but WITHOUT ANY WARRANTY; without even the   */
/*               implied warranty of MERCHANTABILITY or FITNESS FOR A */
/*               PARTICULAR PURPOSE.  See the GNU General Public      */
/*               License for more details.                            */
/*                                                                    */
/*               You should have received a copy of the GNU General   */
/*               Public License along with PP18; see the file         */
/*               COPYING.txt. If not, write to the Free Software      */
/*               Foundation, 59 Temple Place - Suite 330,             */
/*               Boston, MA 02111-1307, USA.                          */
/*                                                                    */
/* History:                                                           */
/*      2002/12/01  [XM] Create this file                             */
/*                                                                    */
/**********************************************************************/

#if !defined(__PP18_H__)
#define __PP18_H__

/***********************************************************************
 * INCLUDES
 **********************************************************************/
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>
#include <Grids.hpp>
#include <Menus.hpp>
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <DBGrids.hpp>
#include <Db.hpp>
#include <DBTables.hpp>
#include <Graphics.hpp>
#include <DB.hpp>

#define  ACTION_WRITE     0
#define  ACTION_READ      1

/***********************************************************************
 * TMainWindow object definition.
 **********************************************************************/
class TMainWindow : public TForm
{
__published:
    TGroupBox        *FILE_Box;
    TGroupBox        *CurDisplay_Box;
    TGroupBox        *PIC_Box;
    TComboBox        *DisplayCombo;
    TEdit            *IDEdit;
    TPopupMenu       *PopupMenu1;
    TMenuItem        *settings;
    TMenuItem        *config;
    TSpeedButton *SB_load;
    TSpeedButton *SB_exit;
    TSpeedButton *SB_save;
    TSpeedButton *SB_download;
    TSpeedButton *SB_upload;
    TOpenDialog      *OpenDialog1;
    TStatusBar       *StatusBar1;
    TSaveDialog      *SaveDialog1;
    TMenuItem        *About;
    TMenuItem        *SelectPIC;
    TMenuItem        *AutotectPIC;
    TTable           *Table1;
    TStringGrid      *StringGrid1;
    TScrollBar       *ScrollBar1;
    TTimer           *Timer1;
    TTimer           *Timer2;
    TEdit            *IDEdit_tmp;
    TLabel           *Label1;
    TLabel           *ChecksumCaption;
    TMenuItem        *Erase;
    TPanel           *Panel1;
    TImage           *Image1;
    TImage           *Image2;
    TMenuItem *AutorunPIC;
    void __fastcall   SB_loadClick(TObject *Sender);
    void __fastcall   SB_exitClick(TObject *Sender);
    void __fastcall   SB_saveClick(TObject *Sender);

    void __fastcall   ScrollBar1Change(TObject *Sender);

    void __fastcall   SelectHWClick(TObject *Sender);
    void __fastcall   SelectPICClick(TObject *Sender);
    void __fastcall   SB_downloadClick(TObject *Sender);
    void __fastcall   AboutClick(TObject *Sender);
    void __fastcall   Timer1Timer(TObject *Sender);
    void __fastcall   AutotectPICClick(TObject *Sender);

    void __fastcall   DisplayComboChange(TObject *Sender);

    void __fastcall   Timer2Timer(TObject *Sender);
    void __fastcall   SB_uploadClick(TObject *Sender);
    void __fastcall   settingsClick(TObject *Sender);
    void __fastcall   FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall   configClick(TObject *Sender);
    void __fastcall   IDEditChange(TObject *Sender);

    void __fastcall   EraseClick(TObject *Sender);

    void __fastcall AutorunPICClick(TObject *Sender);
private:

public:
    __fastcall        TMainWindow(TComponent* Owner);
};

extern PACKAGE TMainWindow *MainWindow;

#endif /* __PP18_H__ */
